<?php

class App_Form_Element_Gallery extends Zend_Form_Element_File
{
	private $galleryArr;
	
	public function setGalleryArr($galleryArr) {
		$this->galleryArr = $galleryArr;
	}
		
    public function loadDefaultDecorators()
    {
        if ($this->loadDefaultDecoratorsIsDisabled()) {
            return;
        }

        $decorators = $this->getDecorators();
        if (empty($decorators)) {
            $this->addDecorator('Gallery')
                 ->addDecorator('Errors')
                 ->addDecorator('Description')
                 ->addDecorator('HtmlTag', array('tag' => 'dd'))
                 ->addDecorator('Label', array('tag' => 'dt'));
        }
    }
    
    public function getGalleryArr() {
    	return $this->galleryArr;
    }
    
    public function addGalleryPhoto($photo) {
    	$this->galleryArr[] = $photo;
    }
}